﻿<UserControl x:Class="Squiggle.UI.Controls.ChatTextBox"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
    <UserControl.Resources>
        <Style x:Key="BorderStyle" TargetType="{x:Type Border}">
            <Setter Property="BorderBrush" Value="#FFBFCBD8" />
            <Setter Property="BorderThickness" Value="1" />
            <Setter Property="CornerRadius" Value="3" />
            <Setter Property="HorizontalAlignment" Value="Stretch" />
            <Setter Property="Background" Value="{DynamicResource {x:Static SystemColors.WindowBrushKey}}" />
        </Style>
    </UserControl.Resources>
    <Border Style="{StaticResource BorderStyle}">
        <FlowDocumentScrollViewer Background="White" x:Name="sentMessages" HorizontalScrollBarVisibility="Auto" VerticalScrollBarVisibility="Auto">
            <FlowDocument ContextMenuOpening="FlowDocument_ContextMenuOpening">
                <FlowDocument.ContextMenu>
                    <ContextMenu>
                        <MenuItem Header="Copy" Command="Copy" />
                        <MenuItem Header="Select All" Command="SelectAll" />
                        <MenuItem x:Name="mnuEdit" Header="Edit" Click="mnuEdit_Click" />
                    </ContextMenu>
                </FlowDocument.ContextMenu>
                <Paragraph TextAlignment="Left" x:Name="Root" FontSize="12" LineHeight="20" />
            </FlowDocument>
        </FlowDocumentScrollViewer>
    </Border>
</UserControl>
